package misc;

/**
 * @author Filip Lindqvist <buggfille@gmail.com>
 * @created 5:08:59 PM - Nov 12, 2011
 */
public class StringTemplate {
    String template;
    String pattern;

    public StringTemplate(String template, String pattern) {
        this.template = template;
        this.pattern = pattern;
    }

    public String toString(String value) {
        return template.replace(pattern, value);
    }

    public String toString(int value) {
        return toString(String.valueOf(value));
    }
}
